package com.feihong.txgw.model.bean.user;

import android.os.Parcel;
import android.os.Parcelable;

import com.feihong.txgw.model.base_bean.CacheTimeBean;

import java.util.List;

/**地理位置信息
 * 分类  检索所需要的
 * Created by PVer on 2017/6/30.
 */
public class SortModel extends CacheTimeBean implements Parcelable {


    /**
     * code : 200
     * msg : 获取信息成功
     * data : {"hot_city":[{"region_id":"458","region_name":"昌吉回族自治州","longitude":"87.296036","latitude":"44.007057","areacode":"0994","first_key":"C"},{"region_id":"457","region_name":"乌鲁木齐市","longitude":"87.564987","latitude":"43.840382","areacode":"0991","first_key":"W"},{"region_id":"456","region_name":"伊犁地区","longitude":"81.297852","latitude":"43.922249","areacode":"0999","first_key":"Y"}],"city":[{"region_id":"461","region_name":"阿勒泰地区","longitude":"88.137917","latitude":"47.839745","areacode":"0906","first_key":"A"},{"region_id":"467","region_name":"阿克苏地区","longitude":"80.269844","latitude":"41.171730","areacode":"0997","first_key":"A"},{"region_id":"472","region_name":"阿拉尔市","longitude":"81.291740","latitude":"40.615681","areacode":"0997","first_key":"A"},{"region_id":"462","region_name":"博尔塔拉蒙古自治州","longitude":"82.052437","latitude":"44.913651","areacode":"0909","first_key":"B"},{"region_id":"468","region_name":"巴音郭楞蒙古自治州","longitude":"86.121689","latitude":"41.771362","areacode":"0996","first_key":"B"},{"region_id":"458","region_name":"昌吉回族自治州","longitude":"87.296036","latitude":"44.007057","areacode":"0994","first_key":"C"},{"region_id":"464","region_name":"和田地区","longitude":"79.930237","latitude":"37.116776","areacode":"0903","first_key":"H"},{"region_id":"470","region_name":"哈密地区","longitude":"93.528358","latitude":"42.858597","areacode":"0902","first_key":"H"},{"region_id":"460","region_name":"克拉玛依市","longitude":"84.881180","latitude":"45.594330","areacode":"0990","first_key":"K"},{"region_id":"465","region_name":"克孜勒苏克尔克孜自治州","longitude":"76.260498","latitude":"39.412800","areacode":"","first_key":"K"},{"region_id":"466","region_name":"喀什地区","longitude":"75.992973","latitude":"39.470627","areacode":"0998","first_key":"K"},{"region_id":"477","region_name":"奎屯","longitude":"85.013931","latitude":"44.559559","areacode":"0992","first_key":"K"},{"region_id":"459","region_name":"石河子市","longitude":"86.041862","latitude":"44.308258","areacode":"0993","first_key":"S"},{"region_id":"463","region_name":"塔城地区","longitude":"82.974884","latitude":"46.758682","areacode":"0901","first_key":"T"},{"region_id":"469","region_name":"吐鲁番地区","longitude":"89.181595","latitude":"42.960468","areacode":"0995","first_key":"T"},{"region_id":"473","region_name":"图木舒克市","longitude":"79.198158","latitude":"39.889221","areacode":"0998","first_key":"T"},{"region_id":"457","region_name":"乌鲁木齐市","longitude":"87.564987","latitude":"43.840382","areacode":"0991","first_key":"W"},{"region_id":"471","region_name":"五家渠市","longitude":"87.565453","latitude":"44.368900","areacode":"0994","first_key":"W"},{"region_id":"456","region_name":"伊犁地区","longitude":"81.297852","latitude":"43.922249","areacode":"0999","first_key":"Y"}]}
     */

    private int code;
    private String msg;
    private DataBean data;

    public SortModel(int code, String msg, DataBean data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public SortModel() {
    }

    protected SortModel(Parcel in) {
        code = in.readInt();
        msg = in.readString();
    }

    public static final Creator<SortModel> CREATOR = new Creator<SortModel>() {
        @Override
        public SortModel createFromParcel(Parcel in) {
            return new SortModel(in);
        }

        @Override
        public SortModel[] newArray(int size) {
            return new SortModel[size];
        }
    };

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(code);
        dest.writeString(msg);
    }

    public static class DataBean implements Parcelable{
        private List<HotCityBean> hot_city;
        private List<CityBean> city;

        public DataBean(List<HotCityBean> hot_city) {
            this.hot_city = hot_city;
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel in) {
                return new DataBean(in);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };

        public List<HotCityBean> getHot_city() {
            return hot_city;
        }

        public void setHot_city(List<HotCityBean> hot_city) {
            this.hot_city = hot_city;
        }

        public List<CityBean> getCity() {
            return city;
        }

        public void setCity(List<CityBean> city) {
            this.city = city;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
        }

        public static class HotCityBean {
            /**
             * region_id : 458
             * region_name : 昌吉回族自治州
             * longitude : 87.296036
             * latitude : 44.007057
             * areacode : 0994
             * first_key : C
             */

            private String region_id;
            private String region_name;
            private String longitude;
            private String latitude;
            private String areacode;
            private String first_key;

            public String getRegion_id() {
                return region_id;
            }

            public void setRegion_id(String region_id) {
                this.region_id = region_id;
            }

            public String getRegion_name() {
                return region_name;
            }

            public void setRegion_name(String region_name) {
                this.region_name = region_name;
            }

            public String getLongitude() {
                return longitude;
            }

            public void setLongitude(String longitude) {
                this.longitude = longitude;
            }

            public String getLatitude() {
                return latitude;
            }

            public void setLatitude(String latitude) {
                this.latitude = latitude;
            }

            public String getAreacode() {
                return areacode;
            }

            public void setAreacode(String areacode) {
                this.areacode = areacode;
            }

            public String getFirst_key() {
                return first_key;
            }

            public void setFirst_key(String first_key) {
                this.first_key = first_key;
            }
        }

        public static class CityBean {
            /**
             * region_id : 461
             * region_name : 阿勒泰地区
             * longitude : 88.137917
             * latitude : 47.839745
             * areacode : 0906
             * first_key : A
             */

            private String region_id;
            private String region_name;
            private String longitude;
            private String latitude;
            private String areacode;
            private String first_key;

            @Override
            public String toString() {
                return "CityBean{" +
                        "region_id='" + region_id + '\'' +
                        ", region_name='" + region_name + '\'' +
                        ", longitude='" + longitude + '\'' +
                        ", latitude='" + latitude + '\'' +
                        ", areacode='" + areacode + '\'' +
                        ", first_key='" + first_key + '\'' +
                        '}';
            }

            public String getRegion_id() {
                return region_id;
            }

            public void setRegion_id(String region_id) {
                this.region_id = region_id;
            }

            public String getRegion_name() {
                return region_name;
            }

            public void setRegion_name(String region_name) {
                this.region_name = region_name;
            }

            public String getLongitude() {
                return longitude;
            }

            public void setLongitude(String longitude) {
                this.longitude = longitude;
            }

            public String getLatitude() {
                return latitude;
            }

            public void setLatitude(String latitude) {
                this.latitude = latitude;
            }

            public String getAreacode() {
                return areacode;
            }

            public void setAreacode(String areacode) {
                this.areacode = areacode;
            }

            public String getFirst_key() {
                return first_key;
            }

            public void setFirst_key(String first_key) {
                this.first_key = first_key;
            }
        }
    }
}
